﻿/* 4. Write an expression that checks for given integer if its third digit (right-to-left) is 7. 
 * E. g. 1732 --> true. */

using System;

public class DigitOnPosition
{
    public static void Main()
    {
        Console.Write("number = "); 
        int number = int.Parse(Console.ReadLine()); 
        byte position = 3;
        byte digit = 7;
        int multiply;
        bool isTrue;
        
        if (number < 0)
            number *= -1;

        multiply = 1;
        for (int i = 0; i < position - 1; i++)
            multiply *= 10;
        
        isTrue = (number >= multiply);
        isTrue = isTrue && ((number / multiply) % 10 == digit);
        Console.WriteLine( isTrue ? "true" : "false");
    }
}